package com.mz.mattress.admin.api.admin;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mz.mattress.admin.api.req.MemberCashOutOrderQueryReq;
import com.mz.mattress.admin.service.MemberCashOutOrderService;
import com.mz.mattress.api.common.Constants;
import com.mz.mattress.api.common.Result;
import com.mz.mattress.api.entity.MemberCashOutOrder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@Slf4j
@RestController
@RequestMapping(Constants.ADMIN_PATH + "memberCashOutOrder")
public class MemberCashOutOrderController {

    @Autowired
    private MemberCashOutOrderService memberCashOutOrderService;

    @GetMapping("/listPage")
    public Result<IPage<MemberCashOutOrder>> listPage(MemberCashOutOrderQueryReq req) {
        return memberCashOutOrderService.listPage(req);
    }

    @GetMapping("/exportList")
    public void exportList(HttpServletResponse response, MemberCashOutOrderQueryReq req) {
        memberCashOutOrderService.exportList(response, req);
    }

}
